import Vue from 'vue'
import VueRouter from 'vue-router'
// import login from ''

Vue.use(VueRouter);

export default new VueRouter({
    routes: [
        {
            path: '/login',
            component: resolve => void(require(['./components/login.vue'], resolve))
        },
        {
            path: '/',
            redirect: '/login'
        },
        {
            name: 'home',
            path: '/home',
            component: resolve => void(require(['./components/common/home.vue'], resolve)),
            children: [
                {
                    path: '/',
                    redirect: '/index'
                },
                {
                    path: '/index',
                    name: '1-1-1',
                    component: resolve => require(['./components/page/index.vue'], resolve)
                },
                {
                    path: '/roles-list',
                    name: '1-2-1',
                    component: resolve => require(['./components/page/roles-list.vue'], resolve)
                },
            ]
        },
    ],
})
